home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1984 October / 64er_Magazin_84-10_1984_Markt__Technik_de.d64 / Erstellen eines (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  7KB  |  218 lines

  1. 7 poke45,peek(174):poke46,peek(175):clr
  2. 8 rem (c) by klaus kloeker
  3. 9 clr:dima$(15),e(50,6),e$(50,6):goto1000
  4. 10 z1=3:z2=9:s=13:rem * maske loeschen *
  5. 15 forz=z1toz2:gosub90:print"                          ":next:ifc=0thenreturn
  6. 20 z1=13:z2=21:c=0:goto15
  7. 30 forj=2to6:e$(i,j)=str$(int(e(i,j)*10+.5)):rem * format tabelle
  8. 35 e$(i,j)=left$(e$(i,j),len(e$(i,j))-1)+"."+right$(e$(i,j),1)
  9. 40 l$="":fora=1to10-len(e$(i,j)):l$=l$+".":next
  10. 45 e$(i,j)=l$+e$(i,j)
  11. 50 iflen(e$(i,j))>10thene$(i,j)=right$(e$(i,j),10)
  12. 55 next:return
  13. 70 load"menue",8:rem *load menue
  14. 80 a=55909:fori=1637to1662:pokei,100:pokea,1:a=a+1:next:return
  15. 90 poke214,z:poke211,s:sys58732:return:rem * cursorposition *
  16. 95 fori=56216to56255:pokei,o:next:return
  17. 100 rem * auswahlroutine *
  18. 110 gosub90:print"           [146]":fori=1to75:nexti
  19. 120 gosub90:print""a$(y)"[146]":fori=1to125:next
  20. 130 getg$:ifg$<>chr$(133)andg$<>chr$(134)andg$<>chr$(135)andg$<>chr$(13)then110
  21. 140 ifg$=chr$(133)andcthenc=0:return
  22. 150 ifg$=chr$(13)thengosub90:a$(y)=">"+mid$(a$(y),2,10):print""a$(y)"[146]":return
  23. 155 ifg$=chr$(134)then170
  24. 160 ifg$=chr$(135)then190
  25. 165 goto110
  26. 170 z=z+sw:y=y+1:ifz>z2thenz=z1:y=y1
  27. 180 goto110
  28. 190 z=z-sw:y=y-1:ifz<z1thenz=z2:y=y2
  29. 195 goto110
  30. 200 rem * wahl-fusszeile *:s=0
  31. 210 z=23:gosub90:print"        [146]";:fori=1to75:next
  32. 220 gosub90:print""ba$(y)"[146]";:fori=1to175:next
  33. 230 getg$:ifg$<>chr$(134)andg$<>chr$(135)andg$<>chr$(13)then210
  34. 240 ifg$=chr$(13)thengosub90:print">[146]";:return
  35. 250 ifg$=chr$(135)then280
  36. 260 s=s+8:y=y+1:ifs>32thens=0:y=1
  37. 270 goto210
  38. 280 s=s-8:y=y-1:ifs<0thens=32:y=5
  39. 290 goto210
  40. 300 rem * eingaberoutine *
  41. 310 gosub90
  42. 320 in$=""
  43. 330 print"[162][157]";
  44. 340 getg$:ifg$=""then340
  45. 350 g=asc(g$):ifg=13thengoto460
  46. 360 ifg=13thenreturn
  47. 370 ifg$<"0"org$>"9"then420
  48. 380 in$=in$+g$
  49. 390 printg$;
  50. 400 iflen(in$)>nthenfori=1tolen(in$):printchr$(20);:next:goto320
  51. 410 goto330
  52. 420 ifg=46then380
  53. 425 ifg$=chr$(133)then9
  54. 430 ifg<>20then330
  55. 440 iflen(in$)<1then330
  56. 450 in$=left$(in$,len(in$)-1):goto390
  57. 460 pn$="":fori=1to(9-len(in$)):pn$=pn$+".":next:printpn$
  58. 470 iflen(in$)<1then310
  59. 480 return
  60. 900 rem * maske *
  61. 910 printma$:a=55388:fori=1076to1906step40:pokei,101:pokea,1:a=a+40:next
  62. 920 a=55776:fori=1504to1514:pokei,100:pokea,1:a=a+1:next
  63. 930 a=55785:fori=1517to1546:pokei,100:pokea,1:a=a+1:next
  64. 950 z=3:s=0:gosub90:print"[193]uswahl :":print"[163][163][163][163][163][163][163][163][163]":print" - - - - - [146]"
  65. 960 z=6:fori=1to3:gosub90:print""a$(i)"[146]":print" - - - - - [146]":z=z+2:next
  66. 970 return
  67. 999 :
  68. 1000 rem ** tilgungsrechnung *
  69. 1010 gosub6000:gosub900
  70. 1020 z=23:s=0:gosub90:printmb$
  71. 1080 z=6:z1=z:z2=10:s=0:y=1:y1=y:y2=3:sw=2:c=0:gosub100:f=y:iff=3then70
  72. 2000 rem * eingabemaske *
  73. 2010 z=3:s=13:gosub90:print"[197]ingabe :":z=4:gosub90:print"[163][163][163][163][163][163][163][163][163]"
  74. 2020 z=5:fori=4to6:s=13:gosub90:print""a$(i)"[146] : ";pm$
  75. 2030 z=z+2:next:z=23:s=0:gosub90:printmc$
  76. 2040 z=5:s=27:n=9:forj=4to6:gosub300:a(j)=val(in$):z=z+2:next
  77. 2070 z=14:s=13:gosub90:print"[197]ingabe korrekt ? (j/n):":gosub80
  78. 2080 z=14:s=38:gosub90:print"[162][157]";
  79. 2090 getg$:ifg$<>"j"andg$<>"n"then2090
  80. 2100 printg$:ifg$="j"theny=1
  81. 2110 ifg$="n"theny=0
  82. 2120 geti$:ifi$<>chr$(13)andi$<>chr$(20)then2120
  83. 2130 ifi$=chr$(20)then2080
  84. 2140 c=1:gosub10:ify=0then2010
  85. 3000 rem * rechnung *
  86. 3005 print"[147]":z=23:s=23:gosub90:printmg$:ee(3)=0:ee(5)=0
  87. 3010 iff=2then3500
  88. 3100 rem * ratentilgung *
  89. 3110 t1=a(4)/a(6):j2=0:t2=0
  90. 3120 fori=1toa(6):r1=a(4)-j2*t2:z1=r1*(a(5)/100):a1=z1+t1
  91. 3130 e(i,2)=r1:e(i,3)=z1:e(i,4)=t1:e(i,5)=a1:e(i,6)=a1/12:gosub30
  92. 3140 forj=3to5step2:ee(j)=ee(j)+e(i,j):next
  93. 3150 j2=j2+1:t2=(a(4)/a(6)):next:goto3700
  94. 3500 rem * aunnuitaetentilgung *
  95. 3510 q1=a(5)/100+1:t1=a(4)*((q1-1)/(q1^a(6)-1))
  96. 3520 z1=a(4)*(a(5)/100):a1=t1+z1:r1=a(4)
  97. 3530 e(1,2)=r1:e(1,3)=z1:e(1,4)=t1:e(1,5)=a1:e(1,6)=a1/12:i=1:gosub30
  98. 3540 t2=t1:fori=2toa(6):r1=r1-t2:z2=r1*(a(5)/100):t2=t2*q1
  99. 3550 e(i,2)=r1:e(i,3)=z2:e(i,4)=t2:e(i,5)=a1:e(i,6)=a1/12:gosub30
  100. 3560 forj=3to5step2:ee(j)=ee(j)+e(i,j):nextj:nexti
  101. 3570 ee(3)=ee(3)+e(1,3):ee(5)=ee(5)+e(1,5)
  102. 3700 ee(3)=ee(3)/2:ee(5)=ee(5)/2
  103. 3710 fori=3to5step2:ee$(i)=str$(int(ee(i)*10/.5))
  104. 3720 ee$(i)=left$(ee$(i),len(ee$(i))-1)+"."+right$(ee$(i),1):next
  105. 3800 rem * screen *
  106. 3805 gosub900
  107. 3810 z=3:s=13:gosub90:print"[197]ingabe :":z=4:gosub90:print"[163][163][163][163][163][163][163][163][163]"
  108. 3820 z=5:s=13:fori=4to6:gosub90:printa$(i)" :"a(i):z=z+2:next
  109. 3830 z=14:s=13:gosub90:print"[210]esultat :":z=15:gosub90:print"[163][163][163][163][163][163][163][163][163][163]"
  110. 3840 z=17:forj=3to5step2:gosub90:print""ec$(j)"[146]:"ee$(j):z=z+2:next
  111. 3850 z=21:gosub90:print"[193]usdruck in '[196][205]' !"
  112. 3860 za=val(ee$(3))/(val(ee$(5))/100)
  113. 3870 z=14:s=0:gosub90:print"   [218]ins-   [146]":z=15:gosub90:print"   anteil  [146]"
  114. 3880 za$=str$(za):ifza<10thenza$=" "+za$
  115. 3890 za$=left$(za$,5):z=17:s=2:gosub90:printza$;" %"
  116. 3900 z=18:s=3:gosub90:print"======"
  117. 3910 z=23:s=0:gosub90:fori=1to5:print""ba$(i)"[146]";:next
  118. 3920 y=1:gosub200:ify=5then70
  119. 3930 ify=4then9
  120. 3940 ify=3then5500
  121. 3950 ify=2then5000
  122. 4000 rem * tabelle *
  123. 4010 gosub95:x1=2:x2=4:y1=1:y2=a(6)
  124. 4020 z=1:s=0:gosub90:fori=1to22:printmd$:next:z=22:gosub90:printmh$
  125. 4030 z=3:s=0:gosub90:printm$(1)
  126. 4040 z=3:s=6:fori=x1tox2:gosub90:printm$(i):s=s+11:next
  127. 4050 z=4:s=1:gosub90:fori=1to37:print"=";:next
  128. 4100 z=6:s=1:fori=y1toy2
  129. 4105 i$=str$(i):ifi<10theni$="."+i$
  130. 4107 gosub90:print"."+i$:s=6
  131. 4110 forj=x1tox2
  132. 4120 gosub90:printe$(i,j)
  133. 4130 s=s+11:nextj
  134. 4140 ifpeek(214)>15theny2=i:y1=y2-9:goto4200
  135. 4150 z=z+1:s=1:nexti
  136. 4200 z=17:s=1:gosub90:forj=1to38:print"-";:next
  137. 4500 wait203,63:getg$
  138. 4510 ifg$=chr$(29)then4550
  139. 4520 ifg$=chr$(157)then4580
  140. 4530 ifg$=chr$(17)then4610
  141. 4540 ifg$=chr$(145)then4640
  142. 4543 ifg$=chr$(133)then3800
  143. 4545 goto4500
  144. 4550 x1=x1+1:x2=x2+1:rem * ->
  145. 4560 ifx2>6thenx2=6:x1=4:goto4500
  146. 4570 goto4030
  147. 4580 x1=x1-1:x2=x2-1:rem * <-
  148. 4590 ifx1<2thenx1=2:x2=4:goto4500
  149. 4600 goto4030
  150. 4610 ifa(6)<10thengoto4500
  151. 4615 y1=y1+10:y2=y2+10:rem * down
  152. 4620 ify2>a(6)theny2=a(6):y1=y2-9:ifi=a(6)then4500
  153. 4630 goto4030
  154. 4640 ifa(6)<10thengoto4500
  155. 4645 y1=y1-10:y2=y2-10:rem * up
  156. 4650 ify1<1theny1=1:y2=y1+9:ifi<11then4500
  157. 4660 goto4030
  158. 5000 rem * aenderung *
  159. 5010 c=1:gosub10:s=0:forz=13to20:gosub90:print"           ":next
  160. 5020 z=3:s=13:gosub90:print"[193]enderung :":z=4:gosub90:print"[163][163][163][163][163][163][163][163][163][163][163]"
  161. 5030 z=5:s=13:fori=4to6:gosub90:print""a$(i)"[146] :";a(i):z=z+2:next
  162. 5040 z=23:s=0:gosub90:printmf$;
  163. 5050 z=5:z1=z:z2=9:s=13:y=4:y1=y:y2=6:sw=2:c=1:gosub100
  164. 5060 ifc=0goto3000
  165. 5070 z=14:s=13:gosub90:print""a$(y)"[146] : ";pm$:gosub80
  166. 5080 z=23:s=0:gosub90:printmc$;:z=14:s=27:gosub300:a(y)=val(in$)
  167. 5090 a$(y)=" "+mid$(a$(y),2,10):goto5010
  168. 5500 rem * printer
  169. 5505 tb$=chr$(16):ta$=chr$(10)
  170. 5510 open4,4,7:print#4,chr$(14)tb$"10[193]usdruck eines [212]ilgungsplanes"
  171. 5520 print#4,tb$;"10-----------------------------"ta$
  172. 5530 fori=4to6:print#4,chr$(15)tb$"10*** "a$(i)" : "a(i):next
  173. 5540 print#4,ta$;ta$;ta$
  174. 5550 fori=1to6:print#4,"   "m$(i);:next:print#4," "
  175. 5560 fori=1to40:print#4,"--";:next:print#4
  176. 5570 fori=1toa(6):i$=str$(i):ifi<10theni$="."+i$
  177. 5575 print#4,"    ."+i$" ";
  178. 5580 forj=2to6:print#4," .."e$(i,j);:nextj:print#4," ":nexti
  179. 5590 fori=1to40:print#4,"--";:next:print#4
  180. 5595 print#4," [199]esamt:";
  181. 5600 po=27:forj=3to5step2:print#4,spc(po-len(ee$(j)))ee$(j);:po=26:next
  182. 5610 print#4,ta$;ta$;tb$"10*** [193]usdruck der [212]abelle erfolgt in '[196][205]' !"
  183. 5620 print#4,tb$"10*** [194]erechnung der [218]insen erfolgt am [197]nde des [202]ahres !"
  184. 5630 print#4,ta$;tb$"10*** [212]ilgung konstant   = [210]atentilgung !!"
  185. 5640 print#4,tb$"10*** [193]nnuitaet konstant = [193]nnuitaetentilgung !!"
  186. 5650 print#4:fori=1to40:print#4,"==";:nexti:print#4,ta$;ta$;ta$;ta$
  187. 5660 close4:goto3860
  188. 6000 rem * variablen *
  189. 6010 ma$="[147]    [212] [201][160][204][160][199][160][213][160][206][160][199][160][211][160][210][160][197][160][195][160][200][160][206][160][213][160][206][160][199]    [146]"
  190. 6020 mb$=" [198]3 u. [198]5 - [215]ahl ! '[210][197][212][213][210][206]' - [197]ingabe !"
  191. 6030 mc$=" [198]1 - [193]uswahl !   [199]eben [211]ie ein !      [146]"
  192. 6040 md$="                                       "
  193. 6050 me$="                                       [146]"
  194. 6060 mf$=" [198]1 - [210]esultat !     [198]3 u. [198]5 - [215]ahl ! [146]"
  195. 6070 mg$="[194]itte [215]arten !!!"
  196. 6080 mh$=" [198]1 - [210]esultat !    [195]ursor - [211]teuern ! [146]"
  197. 6100 a$(1)=" [210]atentilg."
  198. 6110 a$(2)=" [193]nnu.tilg."
  199. 6120 a$(3)="  [205]enue    "
  200. 6130 a$(4)=" [196]arlehen  "
  201. 6140 a$(5)=" [218]inssatz  "
  202. 6150 a$(6)=" [202]ahre     "
  203. 6160 pm$="........."
  204. 6200 m$(1)=" [202]ahr "
  205. 6210 m$(2)="[210]estschuld"
  206. 6220 m$(3)="    [218]insen"
  207. 6230 m$(4)="   [212]ilgung"
  208. 6240 m$(5)=" [193]nnuitaet"
  209. 6250 m$(6)=" [193]nnu./[205]on"
  210. 6300 ec$(3)=" [218]insen  ges."
  211. 6310 ec$(5)=" [193]nnuit. ges."
  212. 6400 ba$(1)=" [212]abelle"
  213. 6410 ba$(2)=" [193]endern"
  214. 6420 ba$(3)="  [203]opie "
  215. 6430 ba$(4)="   [206]eu  "
  216. 6440 ba$(5)="  [205]enue "
  217. 6500 return
  218.